<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@include file="../header.jsp"%>
<!-- start content-outer ........................................................................................................................START -->
<div id="content-outer">
    <!-- start content -->
    <div id="content">

        <!--  start page-heading -->
        <div id="page-heading">
            <h1>Daftar Beasiswa</h1>
        </div>
        <!-- end page-heading -->

        <table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
            <tr>
                <th rowspan="3" class="sized"><img src="../images/shared/side_shadowleft.jpg" width="20" height="300" alt="" /></th>
                <th class="topleft"></th>
                <td id="tbl-border-top">&nbsp;</td>
                <th class="topright"></th>
                <th rowspan="3" class="sized"><img src="../images/shared/side_shadowright.jpg" width="20" height="300" alt="" /></th>
            </tr>
            <tr>
                <td id="tbl-border-left"></td>
                <td>
                    <!--  start content-table-inner ...................................................................... START -->
                    <div id="content-table-inner">

                        <!--  start table-content  -->
                        <div id="table-content">
                            <%
                                ArrayList listRole2 = new ArrayList();
                                listRole2 = (ArrayList) session.getAttribute("role");
                                int count2;
                                String role2;
                                for (count2 = 0; count2 < listRole2.size(); count2++) {
                                    role2 = (String) listRole2.get(count2);
                                    if (role2.equals("admin_tu")) {
                            %>
                            <!--  
                            <div id="message-green">
                            <table border="0" width="100%" cellpadding="0" cellspacing="0">
                            <tr>
                                    <td class="green-left">Beasiswa Berhasil Ditambahkan. <a href="TambahBeasiswa">Tambah Info Beasiswa.</a></td>
                                    <td class="green-right"><a class="close-green"><img src="images/table/icon_close_green.gif"   alt="" /></a></td>
                            </tr>
                            </table>
                            </div>
                            -->
                            <%                                }
                                }
                            %>

                            <!--  start product-table ..................................................................................... -->
                            <form id="mainform" action="">
                                <table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
                                    <tr>

                                        <th class="table-header-repeat line-left"><a href="">No</a>	</th>
                                        <th class="table-header-repeat line-left minwidth-1"><a href="">Nama Beasiswa</a></th>
                                        <th class="table-header-repeat line-left"><a href="">Deskripsi</a></th>
                                        <th class="table-header-repeat line-left"><a href="">DueDate</a></th>
                                        <th class="table-header-repeat line-left"><a href="">Kuota</a></th>
                                        <th class="table-header-repeat line-left"><a href="">Pilihan</a></th>
                                    </tr>
                                    <c:if test="${empty beasiswa1}" >
                                        <tr>
                                            <td colspan="8" align="center" bordercolor="#FF0000" bgcolor="#FF0000"><strong>Data Tidak Ada</strong>
                                            </td>
                                        </tr>   
                                    </c:if>
                                    <% int i = 1;%> 
                                    <c:forEach items="${beasiswa1}" var="beasiswa" >
                                        <tr>
                                            <td><% out.print(i);
                                         i++;%></td>
                                            <td>${beasiswa.namaBeasiswa}</td>
                                            <td>${beasiswa.deskripsiBeasiswa}</td>
                                            <td>${beasiswa.deadline}</td>
                                            <td>${beasiswa.kuotaBeasiswa}</td>
                                            <td class="options-width">
                                                <%
                                                    ArrayList listRole3 = new ArrayList();
                                                    listRole3 = (ArrayList) session.getAttribute("role");
                                                    int count3;
                                                    String role3;
                                                    for (count3 = 0; count3 < listRole3.size(); count3++) {
                                                        role3 = (String) listRole3.get(count3);
                                                        if (role3.equals("admin_tu")) {
                                                %>
                                                <a href="ubahBeasiswa?idBeasiswa=${beasiswa.idBeasiswa}" title="Edit" class="icon-1 info-tooltip"></a>
                                                <a href="hapusBeasiswa?idBeasiswa=${beasiswa.idBeasiswa}" title="Hapus" class="icon-2 info-tooltip" onclick="return alert('Apakah anda yakin untuk menghapus?')"></a>
                                                <%                                }
                                                    }
                                                %>
                                                <a href="detailPengumumanBeasiswa?idBeasiswa=${beasiswa.idBeasiswa}" title="Detail" class="icon-3 info-tooltip"></a></td>

                                        </tr>
                                    </c:forEach>




                                    </tr>
                                </table>
                                <!--  end product-table................................... -->
                            </form>
                        </div>
                        <!--  end content-table  -->

                        <!--  start actions-box ............................................... -->
                        <%
                                    ArrayList listRole4 = new ArrayList();
                                    listRole4 = (ArrayList) session.getAttribute("role");
                                    int count4;
                                    String role4;
                                    for (count4 = 0; count4 < listRole4.size(); count4++) {
                                        role4 = (String) listRole4.get(count4);
                                        if (role4.equals("admin_tu")) {
                                %>
                        <div id="actions-box">
                            <a href="" class="action-slider"></a>
                            <div id="actions-box-slider">
                                
                                <a href="TambahBeasiswa" class="action-edit">Tambah Beasiswa</a>
                                
                            </div>
                            <div class="clear"></div>
                        </div>
                        <%                                }
                                    }
                                %>
                        <!-- end actions-box........... -->

                        <!--  start paging..................................................... -->
                        <table border="0" cellpadding="0" cellspacing="0" id="paging-table">
                            <tr>
                                <td>
                                    <a href="" class="page-far-left"></a>
                                    <a href="" class="page-left"></a>
                                    <div id="page-info">Page <strong>1</strong> / 15</div>
                                    <a href="" class="page-right"></a>
                                    <a href="" class="page-far-right"></a>
                                </td>
                                <td>
                                    <select  class="styledselect_pages">
                                        <option value="">Number of rows</option>
                                        <option value="">1</option>
                                        <option value="">2</option>
                                        <option value="">3</option>
                                    </select>
                                </td>
                            </tr>
                        </table>
                        <!--  end paging................ -->

                        <div class="clear"></div>

                    </div>
                    <!--  end content-table-inner ............................................END  -->
                </td>
                <td id="tbl-border-right"></td>
            </tr>
            <tr>
                <th class="sized bottomleft"></th>
                <td id="tbl-border-bottom">&nbsp;</td>
                <th class="sized bottomright"></th>
            </tr>
        </table>
        <div class="clear">&nbsp;</div>

    </div>
    <!--  end content -->
    <div class="clear">&nbsp;</div>
</div>
<!--  end content-outer........................................................END -->

<div class="clear">&nbsp;</div>
<%@include file="../footer.jsp"%>